/*
*  Copyright 2019-2020 Zheng Jie
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package me.zhengjie.modules.enrstu.domain;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.annotations.CreationTimestamp;
import org.hibernate.annotations.UpdateTimestamp;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

/**
* @website https://eladmin.vip
* @description /
* @author yyx
* @date 2024-11-01
**/
@Entity
@Data
@Table(name="info_file_information")
public class FileInformation implements Serializable {

    @Id
    @Column(name = "`id`")
    @ApiModelProperty(value = "主键ID")
    private String id;
    @Column(name = "`gc_id`")
    @ApiModelProperty(value = "监护人儿童关联id")
    private String gcId;
    @Column(name = "`link_id`")
    @ApiModelProperty(value = "关联表的主键ID")
    private String linkId;

    @Column(name = "`link_name`")
    @ApiModelProperty(value = "关联表的表名")
    private String linkName;

    @Column(name = "`file_name`")
    @ApiModelProperty(value = "文件名称")
    private String fileName;

    @Column(name = "`file_type`")
    @ApiModelProperty(value = "文件类型")
    private String fileType;

    @Column(name = "`file_path`")
    @ApiModelProperty(value = "文件路径")
    private String filePath;

    @Column(name = "`file_size`")
    @ApiModelProperty(value = "文件大小")
    private String fileSize;

    @Column(name = "`file_attachment_Code`")
    @ApiModelProperty(value = "附件参数类型代码")
    private String fileAttachmentCode;

    @Column(name = "`gmt_create`")
    @ApiModelProperty(value = "创建时间")
    @CreationTimestamp
    private Date gmtCreate;

    @Column(name = "`gmt_modified`")
    @ApiModelProperty(value = "修改时间")
    @UpdateTimestamp
    private Date gmtModified;



    public void copy(FileInformation source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}
